<template>
  <div class="map-component">
    <map
      id="map"
      longitude="113.324520"
      latitude="23.099994"
      scale="14"
      :controls="controls"
      :markers="markers"
      style="width: 100%; height: 500px;"
      @click="clickmap"
    >

    </map>
  </div>
</template>
<script>
  export default {
    data(){
      return{
        markers: [{
          iconPath: "../../static/location.png",
          id: 0,
          latitude: 23.099994,
          longitude: 113.324520,
          width: 50,
          height: 50
        }],

      }
    },
    methods:{
      clickmap(e){
        console.log(e);
        wx.openLocation({
          latitude: 23.362490,
          longitude: 116.715790,
          scale: 18,
          name: '华乾大厦',
          address:'金平区长平路93号'
        })
      }
    }
  }
</script>
<style>
  .map-component{
    width: 100%;
    height: 100%;
    background: #000;
  }
</style>
